

<title>行程管理</title>

<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a lay-href="">主页</a>
    <a><cite>行程</cite></a>
    <a><cite>行程管理</cite></a>
  </div>
</div>

<div class="layui-fluid">
  <div class="layui-card">
    <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="layadmin-useradmin-formlist">
      <div class="layui-form-item">
        <div class="layui-inline">
          <label class="layui-form-label">旅游团号</label>
          <div class="layui-input-block">
            <input type="text" name="sthId" placeholder="请输入" autocomplete="off" class="layui-input">
          </div>
        </div>

        <div class="layui-inline">
          <button class="layui-btn layuiadmin-btn-admin" lay-submit lay-filter="LAY-user-back-search">
            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
          </button>
        </div>
      </div>
    </div>

    <div class="layui-card-body">

      <table id="LAY-user-back-manage7" lay-filter="LAY-user-back-manage7"></table>
      <script type="text/html" id="table-useradmin-admin">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
        {{#  if(d.role == '超级管理员'){ }}
        <a class="layui-btn layui-btn-disabled layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>删除</a>
        {{#  } else { }}
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
        {{#  } }}
      </script>
    </div>
  </div>
</div>

<script>
  layui.use('useradmin', layui.factory('useradmin')).use(['admin', 'useradmin', 'table'], function(){
    var $ = layui.$
            ,admin = layui.admin
            ,view = layui.view
            ,table = layui.table
            ,form = layui.form;

    form.render(null, 'layadmin-useradmin-formlist');

    //监听搜索
    form.on('submit(LAY-user-back-search)', function(data){
      var field = data.field;
      var sthId = field.sthId;
      console.log(field);

      //执行重载
      table.reload('LAY-user-back-manage7', {
        url:'/stone/hodometer/selectBySthId',
        where: {
            sthId:sthId
        },page: {
          curr:1
        }
      });
    });

    $('.layui-btn.layuiadmin-btn-admin').on('click', function(){
      var type = $(this).data('type');
      active[type] ? active[type].call(this) : '';
    });
  });


</script>
